package top.laoshuzi.designpatterns.base.created.builder.kotlin

/**
 * 具体建造者
 */
class ConcreteBuilder : Builder {

    private val product: Product = Product()

    override fun buildPart1(): Builder {
        product.part1 = "Part1"
        return this
    }

    override fun buildPart2(): Builder {
        product.part2 = "Part2"
        return this
    }

    override fun buildPart3(): Builder {
        product.part3 = "Part3"
        return this
    }

    override fun build(): Product {
        return product
    }
}